package cn.com.mybaits.type.impl;


import cn.com.mybaits.type.ParamType;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * intger参数类型
 *
 * @author LiuGuodong
 * @date 2023/09/27
 */
public class IntgerParamType implements ParamType<Integer> {

    @Override
    public void setParameter(PreparedStatement statement, Integer paramValue, Integer index) throws SQLException {
        statement.setInt(index, paramValue);
    }

    @Override
    public Integer getParameter(ResultSet resultSet, String paramValue) throws SQLException {
        return resultSet.getInt(paramValue);
    }
}
